#include <iostream>
#include <sstream>
#include <cstdio>
#include <fstream>
using namespace std;
int main()
{
    stringstream ss;
    ofstream file("file.txt");
    if(!file.is_open())
    {
        perror(" open file filed");
    }
    for(int i = 0; i < 1000; i++)
    {
        file << " hello" << endl;
    }
    file.close();
    fstream file1("file.txt", ios::in);
    if(file1.is_open())
    {
        remove("file.txt");
    }
    file1.close();
    return 0;
}